<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
    <meta charset="UTF-8">  
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>Basic LinkButton - jQuery EasyUI Mobile Demo</title>  
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <link rel="stylesheet" type="text/css" href="themes/metro/easyui.css">  
    <link rel="stylesheet" type="text/css" href="themes/mobile.css">  
    <link rel="stylesheet" type="text/css" href="themes/icon.css">  
    <script type="text/javascript" src="js/jquery.min.js"></script>  
    <script type="text/javascript" src="js/jquery.easyui.min.js"></script> 
    <script type="text/javascript" src="js/jquery.easyui.mobile.js"></script> 
</head>
<<script type="text/javascript">
<!--

//-->
$(function(){
	$('#userName').textbox({    
	    iconCls:'icon-man', 
	    iconAlign:'right',
	    prompt:'请输入账号',
	})
	
	$('#password').textbox({    
	   	iconCls:'icon-lock', 
	    iconAlign:'right',
	    prompt:'请输入密码',
	})
	
	//设置用户登录请求
	$('#loginUser').form({    
	    url:'login',
	    success:function(data){ 
	        if(data==1){
	        	location.href = 'showMain';
	        }else{
	        	$.messager.show({
	        		title:'信息提示',
	        		msg:'登陆失败',
	        		timeout:1000,
	        		showType:'slide'
	        	})
	        }
	    }    
	});
	
	
	
	//设置用户登陆按钮 
	$('#btn').linkbutton({
		onClick:function(){
			$('#loginUser').submit();
		}
	});
	//设置管理员登陆按钮 
	$('#btn1').linkbutton({
		onClick:function(){
			location.href = 'showAdmin';
		}
	});
})
</script>


<body>
<div class = "indexInput">
	<form id="loginUser" method="post">
		<div class="header">
			<h2>欢迎使用XXX员工管理系统</h2>
		</div>
		<div class="mid-input">
			<input id="userName" name="userName" type="text" style="width:250px" value="${cookie.uname.value}">
			<br/>
			<br/>
			<input id="password" name="password" type="text" style="width:250px" value="${cookie.upsw.value}">
			<br/>
			<br/>
			<div style="margin-left: 70px;text-align: left;">
				<input type="checkbox"  name="rm"> 记住我
				<a id="btn" href="#" class="easyui-linkbutton" style="margin-left: 20px;">用户登陆</a>
				<!-- <a id="btn1" href="#" class="easyui-linkbutton" style="margin-left: 20px;">管理员登陆</a> -->
			</div>
			
		</div>

	
	</form>
</div>
</body>
</html>